home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / gems / gemsiii.lha / gemsIII / luminaire / geometry_object.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-20  |  844 b   |  29 lines

  1. // ******************************************************************
  2. //
  3. // Physically Correct Direct Lighting For Distribution Ray Tracing
  4. //             by Changyaw Wang
  5. //
  6. // geometry_object.h
  7. //
  8. // ******************************************************************
  9.  
  10. //  Abstract class geom_obj may be subclassed to a particular type of 
  11. //  object such as a sphere, or a triangle.
  12.  
  13. class point;
  14.  
  15. class geom_obj {
  16. public:
  17.  
  18.     // Selects a point visible from x given (r1,r2).  
  19.     // Here, visible means not SELF-shadowed.
  20.  
  21.     virtual void select_visible_point(
  22.              const point& x,   // viewpoint
  23.              const double r1,  // random number
  24.              const double r2,  // random number
  25.              point& on_light,  // point corresponding to (r1,r2)
  26.              double& prob);    // probability of selecting on_light
  27. };
  28.  
  29.